package com.gt.admin.controller;

import com.gt.common.core.controller.BaseController;
import com.gt.common.core.domain.AjaxResult;
import com.gt.common.core.page.TableDataInfo;
import com.gt.admin.domain.vo.CheckFlowVO;
import com.gt.admin.service.ICheckFlowService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "检查随访")
@RestController
@RequestMapping("/check-flow")
public class CheckFlowController extends BaseController {
    @Autowired
    private ICheckFlowService checkFlowService;

    /** 查询检查随访 */
    @ApiOperation(value = "查询检查随访")
    @GetMapping("/list")
    public TableDataInfo list(CheckFlowVO checkFlowVO){
        startPage();
        return getDataTable(checkFlowService.list(checkFlowVO));
    }

    /** 进度监控 */
    @ApiOperation("进度监控")
    @GetMapping("/schedule")
    public AjaxResult schedule(CheckFlowVO checkFlowVO){
        return AjaxResult.success(checkFlowService.schedule(checkFlowVO));
    }

    /** 分析图表 */
    @ApiOperation("分析图表")
    @GetMapping("/graph")
    public AjaxResult analyse(CheckFlowVO checkFlowVO){
        return AjaxResult.success(checkFlowService.analyse(checkFlowVO));
    }
}
